<?php
/**
 * TOP API: alitrip.travel.trades.search request
 * 
 * @author auto create
 * @since 1.0, 2019.01.18
 */
class AlitripTravelTradesSearchRequest
{
	/** 
	 * 类目筛选, 1、旅行购，旅行购定制专用字段，表示搜索旅行购订单。
	 **/
	private $category;
	
	/** 
	 * 当前页
	 **/
	private $currentPage;
	
	/** 
	 * 订单创建 结束时间
	 **/
	private $endCreatedTime;
	
	/** 
	 * 订单状态 过滤。1-等待买家付款，2-等待卖家发货（买家已付款），3-等待买家确认收货，4-交易关闭（买家发起的退款），6-交易成功，8-交易关闭（订单超时 自动关单）
	 **/
	private $orderStatus;
	
	/** 
	 * 页面大小，最大支持的页面大小为100。如查询旅行购订单，则最大支持的页面大小为30
	 **/
	private $pageSize;
	
	/** 
	 * 订单创建 开始时间
	 **/
	private $startCreatedTime;
	
	private $apiParas = array();
	
	public function setCategory($category)
	{
		$this->category = $category;
		$this->apiParas["category"] = $category;
	}

	public function getCategory()
	{
		return $this->category;
	}

	public function setCurrentPage($currentPage)
	{
		$this->currentPage = $currentPage;
		$this->apiParas["current_page"] = $currentPage;
	}

	public function getCurrentPage()
	{
		return $this->currentPage;
	}

	public function setEndCreatedTime($endCreatedTime)
	{
		$this->endCreatedTime = $endCreatedTime;
		$this->apiParas["end_created_time"] = $endCreatedTime;
	}

	public function getEndCreatedTime()
	{
		return $this->endCreatedTime;
	}

	public function setOrderStatus($orderStatus)
	{
		$this->orderStatus = $orderStatus;
		$this->apiParas["order_status"] = $orderStatus;
	}

	public function getOrderStatus()
	{
		return $this->orderStatus;
	}

	public function setPageSize($pageSize)
	{
		$this->pageSize = $pageSize;
		$this->apiParas["page_size"] = $pageSize;
	}

	public function getPageSize()
	{
		return $this->pageSize;
	}

	public function setStartCreatedTime($startCreatedTime)
	{
		$this->startCreatedTime = $startCreatedTime;
		$this->apiParas["start_created_time"] = $startCreatedTime;
	}

	public function getStartCreatedTime()
	{
		return $this->startCreatedTime;
	}

	public function getApiMethodName()
	{
		return "alitrip.travel.trades.search";
	}
	
	public function getApiParas()
	{
		return $this->apiParas;
	}
	
	public function check()
	{
		
		RequestCheckUtil::checkNotNull($this->endCreatedTime,"endCreatedTime");
		RequestCheckUtil::checkNotNull($this->startCreatedTime,"startCreatedTime");
	}
	
	public function putOtherTextParam($key, $value) {
		$this->apiParas[$key] = $value;
		$this->$key = $value;
	}
}
